import React from 'react'
import {Col, Row} from "antd";

import {WeaLocaleProvider,WeaInput,WeaBrowser} from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;

export default class AddExtends extends React.Component{
    render(){
        const {setting,setSetting,subMenuData} = this.props
        const {customMenuId='',customMenuReplaceDatas=[]} = setting

        return (
            <div>
                {
                    subMenuData ? null : (
                        <div style={{'margin-top':'10px'}}>
                            <Row ecId={`${this && this.props && this.props.ecId || ''}_Row@orn4tf`}>
                                <Col ecId={`${this && this.props && this.props.ecId || ''}_Col@sxnf41`} span={6} >
                                    <div>自定义菜单 :</div>
                                </Col>
                                <Col ecId={`${this && this.props && this.props.ecId || ''}_Col@kfnzou`} span={18}>
                                    <WeaBrowser ecId={`${this && this.props && this.props.ecId || ''}_WeaBrowser@uo361z`}
                                        type='menucenter'
                                        replaceDatas={customMenuReplaceDatas}
                                        onChange={(ids, names, datas) =>{
                                            setSetting({customMenuId: ids,customMenuReplaceDatas:datas})
                                        }}
                                    />

                                </Col>
                            </Row>
                        </div>
                    )
                }

            </div>
        )
    }
}